Created: 2/09/2010
By: Sitebase
Email: wim@sitebase.be
Thank you for purchasing my script. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here or on Twitter. Thanks so much!

Table of Contents

  1. Description
  2. Features
  3. Videos
  4. Where to use
  5. Installation
  6. Cronjobs
  7. How to use
  8. Profiles
  9. FAQ

A. Description

This script is a must have for every webdeveloper/webmaster that want to save some time. Advanced Backup System or Abs helps you with tasks as backing up files, backing up databases and deploy new version to a server.

To give you an example: we can create and download a backup of a website with 60Mb of files under two minutes. Try to imagine how long this takes to do it with pure FTP.

Beside taking backups and downloading them you can also deploy new website version, backup to remote FTP server and even rollbackup a file or database backup.

B. Features

C. Videos

Create file and database backups

Using multiple profiles

Save backups on a remote FTP server

Example of doing a new version deloy and rollback

Doing a Wordpress database backup and rollback

D. Where to use

So now we know what we can do with this script. Below I listed some things where and how you can use this script to make your life as a webdeveloper/webmaster easier.

E. Installation

  1. First thing to do is modify the config.php (found in the Script/Abs folder) file username and password (not db.username/db.password) to something you want to use to login the Abs admin panel. The rest of the settings can be changed from the Abs admin panel so you can leave these to the default for now.
  2. Upload the Script/Abs folder to the root of your server (where your index.php/index.html of your website is).
    Set permissions of the Abs directory to 777.
  3. Go with your browser to www.mywebsite.com/Abs. Fill in the username and password you've set in step 1.
  4. Go the the configuration page and click on the set default link beside the Website location and Backup location input field. You can use other locations but only change this if you know what your are doing.
  5. If you don't use a MySQL database for your server you can skip this step .Fill in your database credentials on the configuration page. The MySQL port is most of the time 3306. I've added a description of each setting so this should be no problem.
  6. Now you're ready to create some backups.

 

F. Cron jobs

There are 4 types of actions you can do with cron in combination with Abs.

There is an example cron.php file in the root directory of Abs. Here you can easely
uncomment the acctions you want to do on your server. Below you find a description of
the different functions.

Do a filebackup

Create in the Abs directory a php file with name filebackup.php an place the following code in there:

1

<?php
include("lib/Cron.php");
echo fileBackup();
?>

In the cron script I've build in a sort of security so that not everyone can run this script. You need to add a parameter password with the password that you use to login to Abs. To test if this scirpt works you can run it in your browser like this:

2

http://www.mysite.com/Abs/filebackup.php?password=mypassword

It's also possible to mail the backup to your email address. This can be done by adding a
parameter with your email address.

3

<?php
include("lib/Cron.php");
echo fileBackup("wim@mysite.com");
?>

Do database backups

This works the same as the filebackup only you use another function:

1

<?php
include("lib/Cron.php");
$result = databaseBackup(array("database1", "database2"), "wim@mysite.com");
print_r($result);
?>

The only difference here is that the first parameter is an array of databases you want to backup. The second parameter is an optinional email address if you want the backups to be emailed to you.

Rollback database

Rollback a specific database file. The databaseRollack functions has one parameter and that is a key value array (key => value). The key is the file to rollback and the value is the databasename to where you want to rollback the file.

1

<?php
include("lib/Cron.php");
echo databaseRollback(array("databasefile1.sql" => "databasename1", "databasefile2.sql" =>
"databasename2"));
?>

The database files must be placed in the Abs/backup directory.

Rollback file

Rollback a specific zip file:

1

<?php
include("lib/Cron.php");
echo fileRollback("image.zip");
?>

The zip file must be placed in the Abs/backup directory

G. How to use

File backups/Database backups can be used to Create,download,restore,delete backups.
If you open these pages it will speak for itself.

Deploy can be used to upload new files to your server. You create a zip file of the files you want to deploy and upload them. This zip file will be extracted in root directory of your website. So if you want to upload a file info.php that need to be placed in the directory library on your server. You create a zip from a folder called library with in this directory a file called info.php.

Database importer can be used to import an SQL file to a specific database on your server. The advantage of this import is, that it's much faster than the phpmyadmin import.

H. Profiles

You can now also use multiple profiles to use one installation of ABS to backup/manage multiple websites on your server. To create a new profile copy the config.new.php file to your Abs folder and rename it to config.yourproject.php. Now you have a new profile yourproject in your ABS script that you can access and configure by selection it from the drop down menu.

I. FAQ

My server gives a Server error 500:

Try to remove the .htaccess file in the Abs root directory

My downloaded file backup zip is corrupt:

If you have a bigger website it's best to increase the memory limit in the config. Default
this is set to 32 but if you have a big website you can increase this to 64 or maybe 128.

When I start a file backup it keeps loading but when I refresh I created the ZIP:

This also can indicate a too small memory limit. You can increase the memory limit in the config page.

I get this error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in …

You must have PHP5 installed on your server. This error is shown because you have
PHP4 .

The ABS script doesn't seem to work

If you have problems while creating backups then take a look at the Abs/error.log file. Here you can view if there are any PHP errors.